import 'package:library_base/constant/constant.dart';

class Apis {
  static const String ERRNO = 'err_code';
  static const String MESSAGE = 'msg';
  static const String ERRNO_OK = "0";
  static const String ERRNO_DIO_ERROR = "DIOERROR";
  static const String ERRNO_UNKNOWN = "UNKNOWN";
  static const String ERRNO_UNKNOWN_MESSAGE = "UNKNOWN MESSAGE";
  static const String ERRNO_FORBIDDEN = "FORBIDDEN";
  static const String ERRNO_NOT_SET_PASSWORD = "30021";

  static String get APP_UPDATE {
    if (Constant.envStr == 'prod') {
      return APP_UPDATE_PROD;
    }
    return APP_UPDATE_DEV;
  }

  ///生产环境版本升级请求
  static const String APP_UPDATE_PROD = 'http://platform.meiweitech.com/apis/platform/noAuth/latestApkManager';

  ///测试环境版本升级请求
  static const String APP_UPDATE_DEV = 'http://platform-test.meiweitech.com/apis/platform/noAuth/latestApkManager';

  ///测试环境
  static const String BASE_URL_TEST = 'http://scm-uat.meiweitech.com';

  ///正式环境
  static const String BASE_URL_PROD = 'http://scm.meiweitech.com';

  ///登录接口
  static const String LOGIN = '/admin-api/system/auth/login';

  ///查询数量接口
  static const String WORKBENCH = '/admin-api/scm/purchaser/workbench';

  ///查询供货商接口
  static const String SUPPLIERS = '/admin-api/tms/suppliers/list-by-type';

  ///查询收货仓接口
  static const String WAREHOUSE = '/admin-api/tms/warehouse/list';

  ///查询收货仓接口
  static const String SHIPPER = '/admin-api/tms/shipper/list';

  ///查询添加商品接口
  static const String GOODS = '/admin-api/tms/goods/page';

  ///查询采购任务
  static const String Tasks = '/admin-api/tms/purchases/purchaser/tasks/list';

  ///查询采购员
  static const String BUYER = '/admin-api/system/user/query-user-by-code';

  ///变更采购员
  static const String CHANGE_BUYER = '/admin-api/tms/purchases/change/purchaser/record';

  ///查询需求汇总
  static const String SUMMARY_OF_REQUIREMENTS =
      '/admin-api/tms/purchases/purchaser/wait-for-purchase-goods';

  ///查询采购任务明细
  static const String TASKS_DETAIL = '/admin-api/tms/purchases/purchaser/tasks';

  ///保存并提交采购任务
  static const String FINISHED = '/admin-api/tms/purchases/purchaser/tasks/finished';

  ///发布采购任务
  static const String CREATE_FROM_DEMAND =
      '/admin-api/tms/purchases/purchaser/tasks/create-from-demand';

  ///待调度订单分页查询
  static const String SCHEDUL_PAGE = '/admin-api/tms/schedul/page';

  ///进行中任务列表查询
  static const String PROGRESS_TASK_LIST =
      '/admin-api/tms/distribution/getDistributionUnderwayTaskList';

  ///计费规则下拉框
  static const String ACCOUNT_RULE = '/admin-api/tms/accountRule/list';

  ///查询车牌号
  static const String CARS = '/admin-api/tms/suppliers/cars/list';

  ///查询指定承运商的所有司机
  static const String DRIVERS = '/admin-api/tms/suppliers/drivers/list';

  ///排车确认
  static const String DISTRIBUTION = '/admin-api/tms/distribution';

  ///撤销
  static const String WITHDRAW = '/admin-api/tms/distribution/withdraw';

  ///已完成订单查询
  static const String PURCHASER_ORDERS = '/admin-api/tms/purchases/purchaser/payment/orders/page';

  ///付款申请
  static const String PURCHASER_PAYMENT_ORDERS =
      '/admin-api/tms/purchases/purchaser/payment/orders';

  ///上传照片并返回URL
  static const String UPLOAD = '/admin-api/infra/file/upload';

  ///库存APP首页
  static const String DASHBOARD = '/admin-api/tms/inventory/app/dashboard';

  ///按订单分页查询
  static const String STOCK_OUT_PAGE = '/admin-api/tms/inventory/app/stock/out/order/page';

  ///出库订单明细
  static const String STOCK_OUT_DETAIL = '/admin-api/tms/inventory/app/stock/out/order/detail';

  ///出库分拣分页查询接口
  static const String WEIGHING_GOODS_PAGE = '/admin-api/tms/inventory/app/stock/out/not/weighing/goods/page';

  ///进行库存分配
  static const String STOCK_OUT_LOCK_GOODS = '/admin-api/tms/inventory/app/stock/out/lock/goods';

  ///发货
  static const String FINISH_RECORDS = '/admin-api/tms/inventory/app/stock/out/finish/records';

  ///入库明细
  static const String IN_ORDER_DETAIL = '/admin-api/tms/inventory/app/stock/in/order/detail';

  ///入库明细
  static const String IN_ORDER_PAGE = '/admin-api/tms/inventory/app/stock/in/order/page';

  ///收货完成
  static const String STOCK_IN_FINISH = '/admin-api/tms/inventory/app/stock/in/finish/record';

  ///查询收货库位
  static const String GET_BY_WAREHOUSEID = '/admin-api/mdm/location/getByWarehouseId';

  ///查询原因列表
  static const String LIST_ALL_SIMPLE = '/admin-api/system/dict-data/list-all-simple';

  ///根据仓库查询库位列表
  static const String WEIGHING_RECORD = '/admin-api/tms/inventory/app/stock/out/weighing/record';

  ///保存入库记录
  static const String STOCK_IN_RECORDS = '/admin-api/tms/inventory/app/stock/in/records';

  ///获取打印的详情
  static const String STOCK_OUT_ORDER_PRINT = '/admin-api/tms/inventory/app/stock/out/order/print';

  ///刷新token
  static const String REFRESH_TOKEN = '/admin-api/system/auth/refresh-token';

  ///调度中心 - 进行中 - 订单详情
  static const String ORDER_DETAIL = '/admin-api/tms/distribution/getOrderDetailByOrderId';

  ///订单管理员 - 采购付款 - 已完成采购单 -> 订单修正
  static const String MODIFY_ORDER = '/admin-api/tms/purchases/purchaser/modify/order';

  ///订单管理员 - 创建采购单 -> 生成销售单 列表查询门店
  static const String SUPPLIERS_SHOPS_LIST = '/admin-api/tms/suppliers/shops/list';

}


